<!DOCTYPE html>
<html>
    <head>
        <meta content='' name='description'>
        <meta charset='UTF-8'>
        <meta content='True' name='HandheldFriendly'>
        <meta content='width=device-width, initial-scale=1.0' name='viewport'>
        <title><?php echo $title; ?> - <?php echo $settings['site_name']; ?></title>
        <?php echo $this->load->view('common/header-meta'); ?>
    </head>
    <body id="startbbs">
        <?php echo $this->load->view('common/header'); ?>
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="panel">
                        <div class="panel-heading">
                            <h4>账号设置</h4>
                        </div>
                        <div class="panel-body">
                            <ul class="nav nav-tabs">
                                <li><a href="<?php echo site_url('settings/profile'); ?>">基本信息</a></li>
                                <li><a href="<?php echo site_url('settings/avatar'); ?>">修改头像</a></li>
                                <li><a href="<?php echo site_url('settings/password'); ?>">密码安全</a></li>
                                <li class="active"><a href="#">实名信息</a></li>
                            </ul>
                            <div class="setting">
                                <?php if ($msg != '') echo '<div class="alert alert-danger">' . $msg . '</div>'; ?>
                                <form class="form-horizontal" enctype="multipart/form-data" action="<?php echo site_url('settings/shiming_upload') ?>" method="post">
                                    <input type="hidden" name="<?php echo $csrf_name; ?>" value="<?php echo $csrf_token; ?>">
                                    <fieldset>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">实名状态</label>
                                            <div class="col-md-8">    
                                                <div class="form-control">
                                                    <?php
                                                    echo $user_info['shiming_str'];
                                                    ?>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">姓名</label>
                                            <div class="col-md-8">
                                                <input class="form-control" name="username" readonly="" value="<?php echo $user_info['username']; ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">学号</label>
                                            <div class="col-md-8">
                                                <input class="form-control" name="xuehao" value="<?php echo $user_info['xuehao']; ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">学院</label>
                                            <div class="col-md-8">
                                                <select class="form-control" name="xueyuan">
                                                    <option value="">请选择学院</option>
<?php foreach ($xueyuan as $key => $value) { ?>
                                                        <option value = "<?php echo $key; ?>" 
                                                        <?php
                                                        if ($user_info['xueyuan'] == $key) {
                                                            echo "selected =selected";
                                                        }
                                                        ?> ><?php echo $value; ?></option>
                                                    <?php } ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label" for="user_account_attributes_zhuanye">专业</label>
                                            <div class="col-md-8">
                                                <input class="form-control" id="user_account_attributes_zhuanye" name="zhuanye" size="50" type="text" value="<?php echo $user_info['zhuanye'] ?>" />
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-2 control-label">班级</label>
                                            <div class="col-md-8">
                                                <input class="form-control" name="banji"  value="<?php echo $user_info['banji']; ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">

                                            <label class="col-md-2 control-label">当前一卡通</label>
                                            <div class="col-md-8">
<?php if ($user_info['yikatong']) { ?>
                                                    <img class="large_avatar" src="<?php echo base_url($user_info['yikatong']); ?>" class="img-rounded">
                                                <?php } else { ?>
                                                    <img class="large_avatar" src="<?php echo base_url('static/common/images/timg.png'); ?>"/>
                                                <?php } ?>
                                                <div class="alert alert-info alert-avatar">
                                                    <strong>注意</strong> 支持 512k 以内的 PNG / GIF / JPG 图片文件。
                                                </div>
                                            </div>
                                        </div>
<?php if ($user_info['shimingzhuangtai'] == '0') { ?>
                                            <div class="form-group">
                                                <label class="col-md-2 control-label" for="yikatong">选择图片</label>
                                                <div class="col-md-6">
                                                    <input type="file" id="yikatong" name="yikatong" />
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <div class="col-sm-offset-2 col-sm-6">
                                                    <button type="submit" name="upload" class="btn btn-primary">上传一卡通</button>
                                                </div>
                                            </div>
<?php } ?>
                                    </fieldset>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
<?php $this->load->view('common/sidebar_login') ?>
                    <?php $this->load->view('common/sidebar_ad'); ?>
                </div> 
            </div>
        </div>
<?php $this->load->view('common/footer'); ?>
    </body>
</html>